package com.moyq5.mvc.maker.test.bean.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;

import com.moyq5.mvc.maker.test.bean.enums.SysD0RateType;
import com.moyq5.mvc.maker.test.bean.enums.SysLiquidateType;
import com.moyq5.mvc.maker.test.bean.enums.SysSettleType;

/**
 * 渠道扩展信息-支付信息
 * @author Moyq5
 * @date 2018年5月4日
 */
@Entity
@Table(name = "tra_channel_info")
@DynamicUpdate
public class TraChannelInfo implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 渠道ID
	 */
	@Id
	@OneToOne
	@JoinColumn(name="channel_id")
	private TraChannel channel;
	/**
	 * (渠道)交易地址
	 */
	@Column(name = "pay_url", length = 100, nullable = false)
	private String payUrl;
	/**
	 * (对外)交易地址
	 */
	@Column(name = "open_url", length = 100)
	private String openUrl;
	/**
	 * [交易]同步通知地址
	 */
	@Column(name = "return_url", length = 100)
	private String returnUrl;
	/**
	 * [交易]异步通知地址
	 */
	@Column(name = "notify_url", length = 100)
	private String notifyUrl;
	/**
	 * [交易]交易密钥
	 */
	@Column(name = "key_private", length = 2000)
	private String keyPrivate;
	/**
	 * [交易]交易公钥
	 */
	@Column(name = "key_public", length = 2000)
	private String keyPublic;
	/**
	 * [交易]结算方式，多选
	 * @see {@link SysSettleType}
	 */
	@Column(name = "settle_type", precision = 8, nullable = false)
	private Integer settleType;
	/**
	 * [交易]清算方类型
	 */
    @Enumerated(EnumType.ORDINAL)
    @Column(name = "liquidate_type", precision = 8, nullable = false)
	private SysLiquidateType liquidateType;
	/**
	 * [交易]D0费率类型
	 */
    @Enumerated(EnumType.ORDINAL)
    @Column(name = "d0_rate_type", precision = 8, nullable = false)
	private SysD0RateType d0RateType;
	/**
	 * [退款]退款异步通知地址
	 */
	@Column(name = "refund_notify_url", length = 150)
	private String refundNotifyUrl;
	
	public TraChannel getChannel() {
		return channel;
	}
	public void setChannel(TraChannel channel) {
		this.channel = channel;
	}
	public String getPayUrl() {
		return payUrl;
	}
	public void setPayUrl(String payUrl) {
		this.payUrl = payUrl;
	}
	public String getReturnUrl() {
		return returnUrl;
	}
	public void setReturnUrl(String returnUrl) {
		this.returnUrl = returnUrl;
	}
	public String getNotifyUrl() {
		return notifyUrl;
	}
	public void setNotifyUrl(String notifyUrl) {
		this.notifyUrl = notifyUrl;
	}
	public String getKeyPrivate() {
		return keyPrivate;
	}
	public void setKeyPrivate(String keyPrivate) {
		this.keyPrivate = keyPrivate;
	}
	public String getKeyPublic() {
		return keyPublic;
	}
	public void setKeyPublic(String keyPublic) {
		this.keyPublic = keyPublic;
	}
	public Integer getSettleType() {
		return settleType;
	}
	public void setSettleType(Integer settleType) {
		this.settleType = settleType;
	}
	public SysLiquidateType getLiquidateType() {
		return liquidateType;
	}
	public void setLiquidateType(SysLiquidateType liquidateType) {
		this.liquidateType = liquidateType;
	}
	public SysD0RateType getD0RateType() {
		return d0RateType;
	}
	public void setD0RateType(SysD0RateType d0RateType) {
		this.d0RateType = d0RateType;
	}
	public String getRefundNotifyUrl() {
		return refundNotifyUrl;
	}
	public void setRefundNotifyUrl(String refundNotifyUrl) {
		this.refundNotifyUrl = refundNotifyUrl;
	}
	public String getOpenUrl() {
		return openUrl;
	}
	public void setOpenUrl(String openUrl) {
		this.openUrl = openUrl;
	}
	
}
